using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools
{
    /// <summary>
    /// <para>Make OPeNDAP Raster Layer</para>
    /// <para>Creates a raster layer from data stored on an OPeNDAP server.</para>
    /// <para>根据存储在OPeNDAP服务器上的数据创建栅格图层。</para>
    /// </summary>    
    [DisplayName("Make OPeNDAP Raster Layer")]
    public class MakeOPeNDAPRasterLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeOPeNDAPRasterLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_opendap_URL">
        /// <para>Input OPeNDAP URL</para>
        /// <para>The URL that references the remote OPeNDAP dataset. The URL should resolve to the dataset level (for example, file name), not a directory name.</para>
        /// <para>引用远程 OPeNDAP 数据集的 URL。URL 应解析为数据集级别（例如，文件名），而不是目录名称。</para>
        /// </param>
        /// <param name="_variable">
        /// <para>Variable</para>
        /// <para>The variable from the OPeNDAP dataset that will be used to create the raster layer.</para>
        /// <para>OPeNDAP 数据集中将用于创建栅格图层的变量。</para>
        /// </param>
        /// <param name="_x_dimension">
        /// <para>X Dimension</para>
        /// <para>The dimension of the OPeNDAP dataset used to define the x, or longitude, coordinates of the output raster layer.</para>
        /// <para>用于定义输出栅格图层的 x 或经度坐标的 OPeNDAP 数据集的维度。</para>
        /// </param>
        /// <param name="_y_dimension">
        /// <para>Y Dimension</para>
        /// <para>The dimension of the OPeNDAP dataset used to define the y, or latitude, coordinates of the output raster layer.</para>
        /// <para>用于定义输出栅格图层的 y 或纬度坐标的 OPeNDAP 数据集的维度。</para>
        /// </param>
        /// <param name="_out_raster_layer">
        /// <para>Output Raster Layer</para>
        /// <para>The name of the output raster layer.</para>
        /// <para>输出栅格图层的名称。</para>
        /// </param>
        public MakeOPeNDAPRasterLayer(object _in_opendap_URL, object _variable, object _x_dimension, object _y_dimension, object _out_raster_layer)
        {
            this._in_opendap_URL = _in_opendap_URL;
            this._variable = _variable;
            this._x_dimension = _x_dimension;
            this._y_dimension = _y_dimension;
            this._out_raster_layer = _out_raster_layer;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Make OPeNDAP Raster Layer";

        public override string CallName => "md.MakeOPeNDAPRasterLayer";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_opendap_URL, _variable, _x_dimension, _y_dimension, _out_raster_layer, _extent, _dimension_values, _value_selection_method.GetGPValue(), _cell_registration.GetGPValue()];

        /// <summary>
        /// <para>Input OPeNDAP URL</para>
        /// <para>The URL that references the remote OPeNDAP dataset. The URL should resolve to the dataset level (for example, file name), not a directory name.</para>
        /// <para>引用远程 OPeNDAP 数据集的 URL。URL 应解析为数据集级别（例如，文件名），而不是目录名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input OPeNDAP URL")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_opendap_URL { get; set; }


        /// <summary>
        /// <para>Variable</para>
        /// <para>The variable from the OPeNDAP dataset that will be used to create the raster layer.</para>
        /// <para>OPeNDAP 数据集中将用于创建栅格图层的变量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variable")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _variable { get; set; }


        /// <summary>
        /// <para>X Dimension</para>
        /// <para>The dimension of the OPeNDAP dataset used to define the x, or longitude, coordinates of the output raster layer.</para>
        /// <para>用于定义输出栅格图层的 x 或经度坐标的 OPeNDAP 数据集的维度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("X Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _x_dimension { get; set; }


        /// <summary>
        /// <para>Y Dimension</para>
        /// <para>The dimension of the OPeNDAP dataset used to define the y, or latitude, coordinates of the output raster layer.</para>
        /// <para>用于定义输出栅格图层的 y 或纬度坐标的 OPeNDAP 数据集的维度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Y Dimension")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _y_dimension { get; set; }


        /// <summary>
        /// <para>Output Raster Layer</para>
        /// <para>The name of the output raster layer.</para>
        /// <para>输出栅格图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster_layer { get; set; }


        /// <summary>
        /// <para>Extent</para>
        /// <para>The output extent of the raster layer. Specify the extent coordinates in the units of the OPeNDAP data source (these could be latitude-longitude, projected coordinates, or some arbitrary grid coordinates). The purpose of this parameter is to allow subsetting to an area of interest or to reduce the size of the data that is transferred.</para>
        /// <para>栅格图层的输出范围。以 OPeNDAP 数据源的单位指定范围坐标（这些坐标可以是经纬度、投影坐标或一些任意格网坐标）。此参数的目的是允许子集到感兴趣区域或减小传输数据的大小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Dimension Values</para>
        /// <para><xdoc>
        ///   <para>The starting and ending values of the dimensions or dimensions used to constrain which data will be extracted from the remote OPeNDAP server. By default, the minimum and maximum values of the dimension or dimensions will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Dimension—A netCDF dimension.</bullet_item><para/>
        ///     <bullet_item>Start Value—The start value to use for the specified dimension.</bullet_item><para/>
        ///     <bullet_item>End Value—The end value to use.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于限制从远程 OPeNDAP 服务器提取哪些数据的维度或维度的起始值和结束值。默认情况下，将使用一个或多个维度的最小值和最大值。</para>
        ///   <bulletList>
        ///     <bullet_item>维度 - netCDF 维度。</bullet_item><para/>
        ///     <bullet_item>起始值 - 用于指定尺寸的起始值。</bullet_item><para/>
        ///     <bullet_item>结束值 - 要使用的结束值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dimension Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _dimension_values { get; set; } = null;


        /// <summary>
        /// <para>Value Selection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the dimension value selection method that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>By value—The input value is matched with the actual dimension value.</bullet_item><para/>
        ///     <bullet_item>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的尺寸值选择方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按值 - 输入值与实际尺寸值匹配。</bullet_item><para/>
        ///     <bullet_item>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Selection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_selection_method_value _value_selection_method { get; set; } = _value_selection_method_value._BY_VALUE;

        public enum _value_selection_method_value
        {
            /// <summary>
            /// <para>By index</para>
            /// <para>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</para>
            /// <para>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</para>
            /// </summary>
            [Description("By index")]
            [GPEnumValue("BY_INDEX")]
            _BY_INDEX,

            /// <summary>
            /// <para>By value</para>
            /// <para>By value—The input value is matched with the actual dimension value.</para>
            /// <para>按值 - 输入值与实际尺寸值匹配。</para>
            /// </summary>
            [Description("By value")]
            [GPEnumValue("BY_VALUE")]
            _BY_VALUE,

        }

        /// <summary>
        /// <para>Cell Registration</para>
        /// <para><xdoc>
        ///   <para>Specifies how the cells will be registered with respect to the XY coordinate.</para>
        ///   <bulletList>
        ///     <bullet_item>Center—The XY coordinate represents the center of the cell. This is the default.</bullet_item><para/>
        ///     <bullet_item>Lower Left—The XY coordinate represents the lower left of the cell.</bullet_item><para/>
        ///     <bullet_item>Upper Left—The XY coordinate represents the upper left of the cell.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定单元格相对于 XY 坐标的注册方式。</para>
        ///   <bulletList>
        ///     <bullet_item>中心 - XY 坐标表示像元的中心。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>左下角 - XY 坐标表示单元格的左下角。</bullet_item><para/>
        ///     <bullet_item>左上角 - XY 坐标表示像元的左上角。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cell Registration")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cell_registration_value _cell_registration { get; set; } = _cell_registration_value._CENTER;

        public enum _cell_registration_value
        {
            /// <summary>
            /// <para>Center</para>
            /// <para>Center—The XY coordinate represents the center of the cell. This is the default.</para>
            /// <para>中心 - XY 坐标表示像元的中心。这是默认设置。</para>
            /// </summary>
            [Description("Center")]
            [GPEnumValue("CENTER")]
            _CENTER,

            /// <summary>
            /// <para>Lower Left</para>
            /// <para>Lower Left—The XY coordinate represents the lower left of the cell.</para>
            /// <para>左下角 - XY 坐标表示单元格的左下角。</para>
            /// </summary>
            [Description("Lower Left")]
            [GPEnumValue("LOWER_LEFT")]
            _LOWER_LEFT,

            /// <summary>
            /// <para>Upper Left</para>
            /// <para>Upper Left—The XY coordinate represents the upper left of the cell.</para>
            /// <para>左上角 - XY 坐标表示像元的左上角。</para>
            /// </summary>
            [Description("Upper Left")]
            [GPEnumValue("UPPER_LEFT")]
            _UPPER_LEFT,

        }

        public MakeOPeNDAPRasterLayer SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}